python count number of digits